home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / FRITZ1.DXR / 00247_foedecide3.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  9.1 KB  |  232 lines

  1. on foes3 myfoe, mycnl
  2.   global ppl, foes, mnv, pwr, psyprop, fxpath
  3.   if (getAt(foes, 1) = myfoe) and (myfoe <> 73) then
  4.     if getAt(foes, 1) = myfoe then
  5.       if the locH of sprite getAt(ppl, 1) < (the locH of sprite getAt(ppl, 2) - 120) then
  6.         set the member of sprite mycnl to member(myfoe + 1)
  7.         setAt(foes, 1, 44)
  8.         setAt(mnv, 2, 12)
  9.         sprite(getAt(ppl, 2)).flipH = 0
  10.       else
  11.         if the locH of sprite getAt(ppl, 1) > (the locH of sprite getAt(ppl, 2) + 120) then
  12.           set the member of sprite mycnl to member(myfoe + 1)
  13.           setAt(foes, 1, 44)
  14.           setAt(mnv, 2, 12)
  15.           sprite(getAt(ppl, 2)).flipH = 1
  16.         else
  17.           if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 2)) < 90 then
  18.             set the member of sprite mycnl to member(60)
  19.             setAt(foes, 1, 60)
  20.             setAt(mnv, 2, 5)
  21.             if the locH of sprite getAt(ppl, 1) > the locH of sprite getAt(ppl, 2) then
  22.               sprite(getAt(ppl, 2)).flipH = 1
  23.             else
  24.               sprite(getAt(ppl, 2)).flipH = 0
  25.             end if
  26.             if getAt(pwr, 1) > 0 then
  27.               if psyprop <> 0 then
  28.                 set the keyUpScript to "psyreg"
  29.                 set the keyDownScript to "psyregb"
  30.                 if random(3) = 1 then
  31.                   sound playFile 2, fxpath & random(3) + 286
  32.                 else
  33.                   sound playFile 1, fxpath & "ene1prp.aif"
  34.                 end if
  35.                 puppetSprite(31, 1)
  36.                 set the loc of sprite 31 to the loc of sprite getAt(ppl, 1) - 160
  37.                 set the member of sprite 31 to member("hit" & psyprop, 1)
  38.                 psyprop = 0
  39.                 go("stage3")
  40.               end if
  41.               if (the keyCode = 49) and (getAt(mnv, 1) > 1) then
  42.                 sound playFile 1, fxpath & "enefis.aif"
  43.               else
  44.                 g = random(2)
  45.                 if g = 1 then
  46.                   g = 46
  47.                 else
  48.                   g = 55
  49.                 end if
  50.                 set the member of sprite getAt(ppl, 1) to member(g, 2)
  51.                 setAt(pwr, 1, getAt(pwr, 1) - 5)
  52.                 setAt(mnv, 1, 6)
  53.                 sound playFile 1, fxpath & "ene1hit.aif"
  54.                 if random(3) = 1 then
  55.                   sound playFile 2, fxpath & random(6) + 268
  56.                 else
  57.                   if random(2) = 1 then
  58.                     sound playFile 2, fxpath & random(3) + 283
  59.                   end if
  60.                 end if
  61.               end if
  62.             else
  63.               sound playFile 1, fxpath & "ene1dead.aif"
  64.               set the member of sprite getAt(ppl, 1) to member(46, 2)
  65.               setAt(mnv, 1, 6)
  66.               setAt(mnv, 1, 9)
  67.               go("dead")
  68.             end if
  69.           else
  70.             if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 2)) > 90 then
  71.               setAt(foes, 1, 44)
  72.               setAt(mnv, 2, 12)
  73.             end if
  74.           end if
  75.         end if
  76.       end if
  77.     end if
  78.   else
  79.     if (getAt(foes, 2) = myfoe) and (myfoe <> 207) then
  80.       if the locH of sprite getAt(ppl, 1) < (the locH of sprite getAt(ppl, 3) - 120) then
  81.         set the member of sprite mycnl to member(myfoe + 1)
  82.         setAt(foes, 2, 163)
  83.         setAt(mnv, 3, 12)
  84.         sprite(getAt(ppl, 3)).flipH = 0
  85.       else
  86.         if the locH of sprite getAt(ppl, 1) > (the locH of sprite getAt(ppl, 3) + 120) then
  87.           set the member of sprite mycnl to member(myfoe + 1)
  88.           setAt(foes, 2, 163)
  89.           setAt(mnv, 3, 12)
  90.           sprite(getAt(ppl, 3)).flipH = 1
  91.         else
  92.           if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 3)) < 90 then
  93.             set the member of sprite mycnl to member(175)
  94.             setAt(foes, 2, 175)
  95.             setAt(mnv, 3, 5)
  96.             if the locH of sprite getAt(ppl, 1) > the locH of sprite getAt(ppl, 3) then
  97.               sprite(getAt(ppl, 3)).flipH = 1
  98.             else
  99.               sprite(getAt(ppl, 3)).flipH = 0
  100.             end if
  101.             if getAt(pwr, 1) > 0 then
  102.               if psyprop <> 0 then
  103.                 set the keyUpScript to "psyreg"
  104.                 set the keyDownScript to "psyregb"
  105.                 puppetSprite(31, 1)
  106.                 set the loc of sprite 31 to the loc of sprite getAt(ppl, 1) - 160
  107.                 set the member of sprite 31 to member("hit" & psyprop, 1)
  108.                 psyprop = 0
  109.                 if random(3) = 1 then
  110.                   sound playFile 2, fxpath & random(3) + 286
  111.                 else
  112.                   sound playFile 1, fxpath & "ene1prp.aif"
  113.                 end if
  114.                 go("stage2")
  115.               end if
  116.               if (the keyCode = 49) and (getAt(mnv, 1) > 1) then
  117.                 sound playFile 1, fxpath & "enefis.aif"
  118.               else
  119.                 g = random(2)
  120.                 if g = 1 then
  121.                   g = 46
  122.                 else
  123.                   g = 55
  124.                 end if
  125.                 set the member of sprite getAt(ppl, 1) to member(g, 2)
  126.                 setAt(pwr, 1, getAt(pwr, 1) - 5)
  127.                 setAt(mnv, 1, 6)
  128.                 sound playFile 1, fxpath & "ene1hit.aif"
  129.                 if random(3) = 1 then
  130.                   sound playFile 2, fxpath & random(6) + 268
  131.                 else
  132.                   if random(2) = 1 then
  133.                     sound playFile 2, fxpath & random(3) + 289
  134.                   end if
  135.                 end if
  136.               end if
  137.             else
  138.               sound playFile 1, fxpath & "ene2dead.aif"
  139.               set the member of sprite getAt(ppl, 1) to member(46, 2)
  140.               setAt(mnv, 1, 6)
  141.               setAt(mnv, 1, 9)
  142.               go("dead")
  143.             end if
  144.           else
  145.             if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 2)) > 90 then
  146.               setAt(foes, 2, 163)
  147.               setAt(mnv, 3, 12)
  148.             end if
  149.           end if
  150.         end if
  151.       end if
  152.     else
  153.       if (getAt(foes, 3) = myfoe) and (myfoe <> 207) then
  154.         if getAt(foes, 3) = myfoe then
  155.           if the locH of sprite getAt(ppl, 1) < (the locH of sprite getAt(ppl, 4) - 120) then
  156.             set the member of sprite mycnl to member(myfoe + 1)
  157.             setAt(foes, 3, 163)
  158.             setAt(mnv, 4, 12)
  159.             sprite(getAt(ppl, 4)).flipH = 0
  160.           else
  161.             if the locH of sprite getAt(ppl, 1) > (the locH of sprite getAt(ppl, 4) + 120) then
  162.               set the member of sprite mycnl to member(myfoe + 1)
  163.               setAt(foes, 3, 163)
  164.               setAt(mnv, 4, 12)
  165.               sprite(getAt(ppl, 4)).flipH = 1
  166.             else
  167.               if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 4)) < 90 then
  168.                 set the member of sprite mycnl to member(175)
  169.                 setAt(foes, 3, 175)
  170.                 setAt(mnv, 4, 5)
  171.                 if the locH of sprite getAt(ppl, 1) > the locH of sprite getAt(ppl, 4) then
  172.                   sprite(getAt(ppl, 4)).flipH = 1
  173.                 else
  174.                   sprite(getAt(ppl, 4)).flipH = 0
  175.                 end if
  176.                 if getAt(pwr, 1) > 0 then
  177.                   if psyprop <> 0 then
  178.                     set the keyUpScript to "psyreg"
  179.                     set the keyDownScript to "psyregb"
  180.                     if random(3) = 1 then
  181.                       sound playFile 2, fxpath & random(3) + 286
  182.                     else
  183.                       sound playFile 1, fxpath & "ene1prp.aif"
  184.                     end if
  185.                     puppetSprite(31, 1)
  186.                     set the loc of sprite 31 to the loc of sprite getAt(ppl, 1) - 160
  187.                     set the member of sprite 31 to member("hit" & psyprop, 1)
  188.                     psyprop = 0
  189.                     go("stage3")
  190.                   end if
  191.                   if (the keyCode = 49) and (getAt(mnv, 1) > 1) then
  192.                     sound playFile 1, fxpath & "enefis.aif"
  193.                   else
  194.                     g = random(2)
  195.                     if g = 1 then
  196.                       g = 46
  197.                     else
  198.                       g = 55
  199.                     end if
  200.                     set the member of sprite getAt(ppl, 1) to member(g, 2)
  201.                     setAt(pwr, 1, getAt(pwr, 1) - 5)
  202.                     setAt(mnv, 1, 6)
  203.                     sound playFile 1, fxpath & "ene1hit.aif"
  204.                     if random(3) = 1 then
  205.                       sound playFile 2, fxpath & random(6) + 268
  206.                     else
  207.                       if random(2) = 1 then
  208.                         sound playFile 2, fxpath & random(3) + 289
  209.                       end if
  210.                     end if
  211.                   end if
  212.                 else
  213.                   sound playFile 1, fxpath & "ene1dead.aif"
  214.                   set the member of sprite getAt(ppl, 1) to member(46, 2)
  215.                   setAt(mnv, 1, 6)
  216.                   setAt(mnv, 1, 9)
  217.                   go("dead")
  218.                 end if
  219.               else
  220.                 if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 4)) > 90 then
  221.                   setAt(foes, 3, 163)
  222.                   setAt(mnv, 4, 12)
  223.                 end if
  224.               end if
  225.             end if
  226.           end if
  227.         end if
  228.       end if
  229.     end if
  230.   end if
  231. end
  232.